<!--
 * @Author: 码上talk|RC
 * @Date: 2021-08-04 17:34:56
 * @LastEditTime: 2021-08-19 10:55:35
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /ma-portal/pages/index/i-block.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
  <view class="i-block">
    <view class="i-block-header" @tap="headerClick">
      <text class="i-block-title">{{ title||'--' }}</text>
      <view class="i-block-more">
        <text class="i-block-more-txt">查看更多</text>
        <text class="iconfont">&#xe641;</text>
      </view>
    </view>
    <view class="i-block-cont">
      <slot></slot>
    </view>
  </view>
</template>

<script>
export default {
  name: '',
  components: {},
  mixins: [],
  props: {
    title: String
  },
  data () {
    return {}
  },
  methods: {
    headerClick () {
      this.$emit('click-more')
    }
  }
}
</script>

<style lang="less">
.i-block {
  &-header {
    .flexLayout(@a:center);
    padding: 24rpx 0;
    &:active {
      background: #eee;
    }
  }
  &-title {
    flex: 1;
    font-size: 32rpx;
    font-weight: bold;
    color: #333;
  }
  &-more {
    font-size: 0;
    &-txt {
      font-size: 28rpx;
      font-weight: 500;
      color: #999;
    }
    .iconfont {
      color: #999;
      font-size: 28rpx;
    }
  }
}
</style>